<!--<!DOCTYPE HTML>-->
<!--<html>-->
<!--<head>-->
<!--    <meta charset="utf-8">-->
<!--    <meta name="renderer" content="webkit|ie-comp|ie-stand">-->
<!--    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->
<!--    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />-->
<!--    <meta http-equiv="Cache-Control" content="no-siteapp" />-->
<!--    &lt;!&ndash;[if lt IE 9]>-->
<!--    <script type="text/javascript" src="lib/html5shiv.js"></script>-->
<!--    <script type="text/javascript" src="lib/respond.min.js"></script>-->
<!--    <![endif]&ndash;&gt;-->
<!--    <link href="static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />-->
<!--    <link href="static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />-->
<!--    <link href="static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />-->
<!--    <link href="lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />-->
<!--    &lt;!&ndash;[if IE 6]>-->
<!--    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>-->
<!--    <script>DD_belatedPNG.fix('*');</script>-->
<!--    <![endif]&ndash;&gt;-->
<!--    <title>后台登录 - H-ui.admin v3.1</title>-->
<!--    <meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">-->
<!--    <meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">-->
<!--</head>-->
<!--<body>-->
<!--<input type="hidden" id="TenantId" name="TenantId" value="" />-->
<!--<div class="header">-->
<!--    <img src="static/h-ui.admin/images/logo.png " style="no-repeat: 0 center ">-->
<!--</div>-->
<!--<div class="loginWraper">-->
<!--    <div id="loginform" class="loginBox">-->
<!--        <form method="post" class="login-form" action="/user/login" label-position="left"  >-->
<!--            <div class="row cl">-->
<!--                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>-->
<!--                <div class="formControls col-xs-8">-->
<!--                    <input id=" " name="username" type="text" placeholder="账户" class="input-text size-L">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="row cl">-->
<!--                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>-->
<!--                <div class="formControls col-xs-8">-->
<!--                    <input id="" name="password" type="password" placeholder="密码" class="input-text size-L">-->
<!--                </div>-->
<!--            </div>-->
<!--&lt;!&ndash;            <div class="row cl">&ndash;&gt;-->
<!--&lt;!&ndash;                <div class="formControls col-xs-8 col-xs-offset-3">&ndash;&gt;-->
<!--&lt;!&ndash;                    <input class="input-text size-L" type="text" placeholder="验证码" name="code" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">&ndash;&gt;-->
<!--&lt;!&ndash;                    <img src=""> <a id="kanbuq" href="javascript:;">看不清，换一张</a> </div>&ndash;&gt;-->
<!--&lt;!&ndash;            </div>&ndash;&gt;-->
<!--            <div class="row cl">-->
<!--                <div class="formControls col-xs-8 col-xs-offset-3">-->
<!--                    <input class="input-text size-L" type="text" placeholder="请输入验证码" name="code" onblur="if(this.value==''){this.value='请输入验证码'}" onclick="if(this.value=='请输入验证码'){this.value='';}" value="" style="width:150px;">-->
<!--                    <img id="captchaImage" src="" alt="验证码">-->
<!--                    <a id="kanbuq" href="javascript:;" onclick="generateCaptcha()">看不清，换一张</a>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="row cl">-->
<!--                <div class="formControls col-xs-8 col-xs-offset-3">-->
<!--                    <label for="online">-->
<!--                        <input type="checkbox" name="online" id="online" value="">-->
<!--                        使我保持登录状态</label>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="row cl">-->
<!--                <div class="formControls col-xs-8 col-xs-offset-3">-->
<!--                    <button type="submit" class="btn btn-success radius size-L">&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;</button>-->
<!--                    <button type="reset" class="btn btn-default radius size-L">&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;</button>-->
<!--                </div>-->
<!--            </div>-->
<!--        </form>-->
<!--    </div>-->
<!--</div>-->
<!--<div class="footer">©2024 挖掘机培训系统 All rights reserved.</div>-->
<!--<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>-->
<!--<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>-->
<!--&lt;!&ndash;此乃百度统计代码，请自行删除&ndash;&gt;-->
<!--<script>-->
<!--    var _hmt = _hmt || [];-->
<!--    (function() {-->
<!--        var hm = document.createElement("script");-->
<!--        hm.src = "https://hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";-->
<!--        var s = document.getElementsByTagName("script")[0];-->
<!--        s.parentNode.insertBefore(hm, s);-->
<!--    })();-->
<!--    function generateCaptcha() {-->
<!--        // 生成4位随机数字-->
<!--        const captcha = Math.floor(1000 + Math.random() * 9000).toString();-->

<!--        // 创建canvas元素-->
<!--        const canvas = document.createElement('canvas');-->
<!--        canvas.width = 100;-->
<!--        canvas.height = 40;-->
<!--        const ctx = canvas.getContext('2d');-->

<!--        // 设置字体样式-->
<!--        ctx.font = '20px Arial';-->
<!--        ctx.textBaseline = 'middle';-->
<!--        ctx.textAlign = 'center';-->

<!--        // 绘制验证码-->
<!--        ctx.fillStyle = '#000';-->
<!--        ctx.fillText(captcha, canvas.width / 2, canvas.height / 2);-->

<!--        // 将canvas内容转换为数据URL-->
<!--        const dataURL = canvas.toDataURL('image/png');-->

<!--        // 更新验证码图片的src属性-->
<!--        document.getElementById('captchaImage').src = dataURL;-->
<!--    }-->

<!--    // 页面加载时生成初始验证码-->
<!--    window.onload = function() {-->
<!--        generateCaptcha();-->
<!--    };-->
<!--</script>-->
<!--&lt;!&ndash;/此乃百度统计代码，请自行删除-->
<!--</body>-->
<!--</html>-->
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5shiv.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <![endif]-->
    <link href="static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
    <link href="static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
    <link href="lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>后台登录 - H-ui.admin v3.1</title>
    <meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
    <meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header">
    <img src="static/h-ui.admin/images/logo.png " style="no-repeat: 0 center ">
</div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form method="post" class="login-form" action="/user/login"  onsubmit="return validateForm()">
           <!-- label-position="left"-->
            <div class="row cl">
                <label class="form-label col-xs-3" style="margin-left: 80px"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8" style="margin-left: -100px">
                    <input id=" " name="username" type="text" placeholder="账户" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3" style="margin-left: 80px"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8" style="margin-left: -100px">
                    <input id="" name="password" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3" style="margin-left: 142px">
                    <input class="input-text size-L" type="text" placeholder="请输入验证码" name="code" onblur="if(this.value==''){this.value='请输入验证码'}" onclick="if(this.value=='请输入验证码'){this.value='';}" value="" style="width:150px;">
                    <img id="captchaImage" src="" alt="验证码">
                    <a id="kanbuq" href="javascript:;" onclick="generateCaptcha()">看不清，换一张</a>
                </div>
            </div>
<!--            <div class="row cl">-->
<!--                <div class="formControls col-xs-8 col-xs-offset-3">-->
<!--                    <label for="online">-->
<!--                        <input type="checkbox" name="online" id="online" value="">-->
<!--                        使我保持登录状态</label>-->
<!--                </div>-->
<!--            </div>-->
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <button type="submit" class="btn btn-success radius size-L">&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;</button> <button type="button" class="btn btn-primary radius size-L" onclick="showRegister()">&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;册&nbsp;</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">©2024 挖掘机培训系统 All rights reserved.</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<!--此乃百度统计代码，请自行删除-->
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d11";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
    function generateCaptcha() {
        // 生成4位随机带字母的随机数
        // ABCDEFGHIJKLMNOPQRSTUVWXYZ
        var letters = 'abcdefghijklmnopqrstuvwxyz';
        var numbers = '0123456789';
        var captcha = '';
        for (var i = 0; i < 6; i++) {
            if (i % 2 === 0) {
                captcha += letters[Math.floor(Math.random() * letters.length)];
            } else {
                captcha += numbers[Math.floor(Math.random() * numbers.length)];
            }
        }
        // const captcha = Math.floor(100000 + Math.random() * 900000).toString();

        // 创建canvas元素
        const canvas = document.createElement('canvas');
        canvas.width = 100;
        canvas.height = 40;
        const ctx = canvas.getContext('2d');

        // 设置字体样式
        ctx.font = '20px Arial';
        ctx.textBaseline = 'middle';
        ctx.textAlign = 'center';

        // 绘制验证码
        ctx.fillStyle = '#000';
        ctx.fillText(captcha, canvas.width / 2, canvas.height / 2);

        // 将canvas内容转换为数据URL
        const dataURL = canvas.toDataURL('image/png');

        // 更新验证码图片的src属性,添加背景图片
        document.getElementById('captchaImage').style.backgroundImage = 'url(' + dataURL + ')';
        document.getElementById('captchaImage').src = dataURL;

        // 存储生成的验证码
        sessionStorage.setItem('captcha', captcha);
    }

    // 页面加载时生成初始验证码
    window.onload = function() {
        generateCaptcha();
    };

    function validateForm() {
        const userCaptcha = document.getElementsByName('code')[0].value;
        const storedCaptcha = sessionStorage.getItem('captcha');

        if (userCaptcha === '') {
            alert('请输入验证码');
            return false;
        }

        if (userCaptcha !== storedCaptcha) {
            alert('验证码不正确');
            // 刷新验证码
            generateCaptcha();
            return false;
        }

        return true;
    }
</script>
<script type="text/javascript">
    $(function() {
        window.showRegister = function() {
            layer.open({
                type: 1,
                title: ['用户注册', 'font-size:18px;text-align:center;'],
                area: ['460px', '580px'],
                shadeClose: true,
                content: `
                        <div class="pd-20">
                            <form class="form form-horizontal" id="registerForm" style="margin-top:15px;">
                                <div class="row cl" style="margin-bottom:20px;">
                                    <label class="form-label col-xs-4" style="line-height:34px;"><span class="c-red">*</span>用户名：</label>
                                    <div class="formControls col-xs-7">
                                        <input type="text" class="input-text radius" name="username" placeholder="请输入用户名" style="height:34px;">
                                    </div>
                                </div>
                                <div class="row cl" style="margin-bottom:20px;">
                                    <label class="form-label col-xs-4" style="line-height:34px;"><span class="c-red">*</span>密码：</label>
                                    <div class="formControls col-xs-7">
                                        <input type="password" class="input-text radius" name="password" placeholder="请输入密码" style="height:34px;">
                                    </div>
                                </div>
                                <div class="row cl" style="margin-bottom:20px;">
                                    <label class="form-label col-xs-4" style="line-height:34px;"><span class="c-red">*</span>身份证号：</label>
                                    <div class="formControls col-xs-7">
                                        <input type="text" class="input-text radius" name="idCard" placeholder="请输入身份证号" style="height:34px;">
                                    </div>
                                </div>
                                <div class="row cl" style="margin-bottom:20px;">
                                    <label class="form-label col-xs-4" style="line-height:34px;">性别：</label>
                                    <div class="formControls col-xs-7" style="line-height:34px;">
                                        <div class="radio-box" style="padding-top:3px;">
                                            <input type="radio" id="sex-1" name="sex" value="男" checked>
                                            <label for="sex-1">男</label>
                                        </div>
                                        <div class="radio-box" style="padding-top:3px;margin-left:20px;">
                                            <input type="radio" id="sex-2" name="sex" value="女">
                                            <label for="sex-2">女</label>
                                        </div>
                                    </div>
                                </div>
                                <div class="row cl" style="margin-bottom:30px;">
                                    <label class="form-label col-xs-4" style="line-height:34px;"><span class="c-red">*</span>手机号：</label>
                                    <div class="formControls col-xs-7">
                                        <input type="text" class="input-text radius" name="phone" placeholder="请输入手机号" style="height:34px;">
                                    </div>
                                </div>
                                <div class="row cl">
                                    <div class="col-xs-12" style="text-align:center;">
                                        <button type="button" class="btn btn-primary radius" onclick="submitRegister()" style="padding:0 35px;height:34px;line-height:32px;font-size:14px;">
                                            <i class="Hui-iconfont">&#xe632;</i> 提交注册
                                        </button>
                                        <button type="button" class="btn btn-default radius ml-20" onclick="layer.closeAll()" style="padding:0 35px;height:34px;line-height:32px;font-size:14px;">
                                            <i class="Hui-iconfont">&#xe6a6;</i> 取消
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>`,
                success: function(layero, index) {
                    // 添加自定义样式
                    $(layero).find('.layui-layer-title').css({
                        'background-color': '#2d8cf0',
                        'color': '#fff',
                        'border': 'none'
                    });

                    // 添加输入框焦点样式
                    $(layero).find('.input-text').focus(function() {
                        $(this).css('border-color', '#2d8cf0');
                    }).blur(function() {
                        $(this).css('border-color', '#ddd');
                    });
                }
            });
        };

        window.submitRegister = function() {
            var formData = new FormData(document.getElementById("registerForm"));

            // 表单验证
            if (!formData.get("username")) {
                layer.msg('用户名不能为空', {
                    icon: 2
                });
                return;
            }
            if (!formData.get("password")) {
                layer.msg('密码不能为空', {
                    icon: 2
                });
                return;
            }
            if (!formData.get("idCard")) {
                layer.msg('身份证号不能为空', {
                    icon: 2
                });
                return;
            }
            if (!formData.get("phone")) {
                layer.msg('手机号不能为空', {
                    icon: 2
                });
                return;
            }

            // 发送注册请求
            $.ajax({
                url: '/user/register',
                type: 'POST',
                data: formData,
                processData: false,
                contentType: false,
                success: function(response) {
                    if (response.code === 0) {
                        layer.msg('注册成功！', {
                            icon: 1
                        });
                        layer.closeAll();
                    } else {
                        layer.msg(response.msg || '注册失败，请重试！', {
                            icon: 2
                        });
                    }
                },
                error: function() {
                    layer.msg('注册失败，请重试！', {
                        icon: 2
                    });
                }
            });
        };
    });
</script>

<!--此乃百度统计代码，请自行删除-->
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<!--/此乃百度统计代码，请自行删除
</body>
</html>
